package com.asset.manage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asset.manage.mapper.CompanyMapper;
import com.asset.manage.domain.Company;
import com.asset.manage.service.ICompanyService;

/**
 * 组织架构Service业务层处理
 *
 * @author mobin
 * @date 2024-08-24
 */
@Service
public class CompanyServiceImpl implements ICompanyService {
    @Autowired
    private CompanyMapper companyMapper;

    /**
     * 查询组织架构
     *
     * @param id 组织架构主键
     * @return 组织架构
     */
    @Override
    public Company selectCompanyById(Long id) {
        return companyMapper.selectCompanyById(id);
    }

    /**
     * 查询组织架构列表
     *
     * @param company 组织架构
     * @return 组织架构
     */
    @Override
    public List<Company> selectCompanyList(Company company) {
        return companyMapper.selectCompanyList(company);
    }

    /**
     * 新增组织架构
     *
     * @param company 组织架构
     * @return 结果
     */
    @Override
    public int insertCompany(Company company) {
        return companyMapper.insertCompany(company);
    }

    /**
     * 修改组织架构
     *
     * @param company 组织架构
     * @return 结果
     */
    @Override
    public int updateCompany(Company company) {
        return companyMapper.updateCompany(company);
    }

    /**
     * 批量删除组织架构
     *
     * @param ids 需要删除的组织架构主键
     * @return 结果
     */
    @Override
    public int deleteCompanyByIds(Long[] ids) {
        return companyMapper.deleteCompanyByIds(ids);
    }

    /**
     * 删除组织架构信息
     *
     * @param id 组织架构主键
     * @return 结果
     */
    @Override
    public int deleteCompanyById(Long id) {
        return companyMapper.deleteCompanyById(id);
    }
}
